<?php include $this->admin_tpl("header"); ?>
<script type="text/javascript" src="/template/default/statics/js/area.js"></script>
<script>var ajaxurl = "/index.php?m=admin&c=union&a=getArea";</script>
<script>var ajaxagencyurl = "/index.php?m=admin&c=agency&a=getAgency";</script>

	<script src="/statics/js/layer/layer.js"></script>
<div class="content">
  <div class="site"> <?php echo C('site_name')?> <a href="#">会员管理</a> ><?php echo  isset($_GET['if_upd']) ? '编辑会员' : '添加会员';?></div> 
  
  <span class="line_white"></span>
  <div class="sm">小提示：所添加的会员默认登录和交易密码为<strong><font color='red'>手机号码后6位</font></strong></div>
  <div class="install mt10">
    <dl>
      <dd>
      <div class="install mt10">
        <div class="install mt10">
          <dl>
            <form action="<?php echo U(ACTION_NAME); ?>" class="addform" method="post" onsubmit="return false">
              <dd>
              <ul class="web">
                <li> <strong>会员登陆手机号：</strong>
                  <?php if (empty($info)): ?>
                  <input type="text" class="text_input" name="username" placeholder='' datatype="*2-15" value="<?php echo $info['username']; ?>" />
                  <span class="Validform_checktip "><font class="red">*</font> 设置会员用户名称，格式为手机号</span>
                  <?php else: ?>
                <dd style="float:left" class="text_input">
                <?php echo $info['username']; ?>
                </dd>
                <span class="Validform_checktip " style="float:left">不可编辑</span>
                <?php endif ?>
                </li>

                  <li> <strong>推荐人：</strong>
                  <?php if(empty($info)) : ?>
                      <input type="text" class="text_input"  name="refer_id"   value="" />
                      <span class="Validform_checktip">填写推荐人账号 ( 添加后不可修改 )</span>
                  <?php else : ?>
                      <dd style="float:left" class="text_input">
                      <?php echo $yinfo['username']; ?>
                      </dd>
                      <span class="Validform_checktip " style="float:left">不可编辑</span>
                  <?php endif ?>
                  
            
                 
                 </li>

                <div  style="clear:both;"></div>



                <li> <strong>昵称：</strong>
                <?php if(!empty($info)) : ?>
                  <input type="text" class="text_input"  name="nickname"   value="<?php echo $info['nickname']; ?>" />

                <?php else: ?>
               
                  <input type="text" class="text_input"  name="nickname"   value="" />
         
                <?php endif ?>
                 </li>

                <div  style="clear:both;"></div>
                </li>

                 <!-- <li> <strong>余额：</strong>
                <?php if(!empty($info)) : ?>
                  <input type="text" class="text_input"  name="balance"   value="<?php echo $info['balance']; ?>" />

                <?php else: ?>
               
                  <input type="text" class="text_input"  name="balance"   value="" />
         
                <?php endif ?>
                 </li>

                <div  style="clear:both;"></div>
                </li>


                 <li> <strong>升值链：</strong>
                <?php if(!empty($info)) : ?>
                  <input type="text" class="text_input"  name="upvaluation"   value="<?php echo $info['upvaluation']; ?>" />

                <?php else: ?>
               
                  <input type="text" class="text_input"  name="upvaluation"   value="" />
         
                <?php endif ?>
                 </li>

                <div  style="clear:both;"></div>
                </li> -->



                <li> <strong>是否冻结：</strong> <b style="width:250px;" class="">
                  <?php if(empty($info)) : ?>
                      <label><input type="radio" name="status" placeholder=''  value="1" checked = "checked">正常</label>
                      <label><input type="radio" name="status" placeholder=''  value='0'> 冻结</label>
                  <?php else : ?>
                        <?php if($info['status'] == 1) : ?>
                            <label><input type="radio" name="status" placeholder=''  value="1" checked = "checked">正常</label>
                            <label><input type="radio" name="status" placeholder=''  value="0">冻结</label>
                        <?php else : ?>
                          <label><input type="radio" name="status" placeholder=''  value="1">正常</label>
                          <label><input type="radio" name="status" placeholder=''  value="0" checked = "checked">冻结</label>
                        <?php endif ?>
                  </b> <span class="Validform_checktip" style="margin-left:3px;">设置会员状态</span> 
                  <?php endif ?>
                </li>



                <li> <strong>实名认证认证状态：</strong> <b style="width:250px;" class="">
                  <?php if(empty($info)) : ?>
                      <label>
                      <label><input type="radio" name="if_identification" placeholder=''  value='1' checked="checked">未上传</label>
                            <label><input type="radio" name="if_identification" placeholder=''  value='2' >审核中</label>
                            <label><input type="radio" name="if_identification" placeholder=''  value='3' >已审核</label>
                            <label><input type="radio" name="if_identification" placeholder=''  value='4' >未通过</label>
                  <?php else : ?>
                        <?php if($info['if_identification'] == 1 ) : ?>
                            <label><input type="radio" name="if_identification" placeholder=''  value='1' checked="checked">未上传</label>
                            <label><input type="radio" name="if_identification" placeholder=''  value='2' >审核中</label>
                            <label><input type="radio" name="if_identification" placeholder=''  value='3' >已审核</label>
                            <label><input type="radio" name="if_identification" placeholder=''  value='4' >未通过</label>
                        <?php elseif($info['if_identification'] == 2) :  ?>
                            <label><input type="radio" name="if_identification" placeholder=''  value='1' >未上传</label>
                            <label><input type="radio" name="if_identification" placeholder=''  value='2' checked="checked">审核中</label>
                            <label><input type="radio" name="if_identification" placeholder=''  value='3' >已审核</label>
                            <label><input type="radio" name="if_identification" placeholder=''  value='4' >未通过</label>
                        <?php elseif($info['if_identification'] == 3) :  ?>
                            <label><input type="radio" name="if_identification" placeholder=''  value='1' >未上传</label>
                            <label><input type="radio" name="if_identification" placeholder=''  value='2' >审核中</label>
                            <label><input type="radio" name="if_identification" placeholder=''  value='3' checked="checked">已审核</label>
                            <label><input type="radio" name="if_identification" placeholder=''  value='4' >未通过</label>
                        <?php elseif($info['if_identification'] == 4) :  ?>
                            <label><input type="radio" name="if_identification" placeholder=''  value='1' >未上传</label>
                            <label><input type="radio" name="if_identification" placeholder=''  value='2' >审核中</label>
                            <label><input type="radio" name="if_identification" placeholder=''  value='3' >已审核</label>
                            <label><input type="radio" name="if_identification" placeholder=''  value='4' checked="checked">未通过</label>
                        <?php endif ?>
                  <?php endif ?>
                  </b> <span class="Validform_checktip" style="margin-left:3px;">认证状态</span> 
                </li>
              <?php if(!empty($info)) :  ?>
              <input type="hidden" class="text_input" name="username1" placeholder='' datatype="*2-15" value="<?php echo $info ? $info['username'] : ''; ?>" />
              <?php endif  ?>
              </ul>
              <div class="submit">
                <input type="submit" class='button_search' value='提交'/>
                <a href="<?php echo U('lists')?>">返回</a> </div>
              </dd>
            </form>
          </dl>
        </div>
      </div>
      </dd>
    </dl>
  </div>
  <?php include $this->admin_tpl("copyright"); ?>
</div>


<!--时间选择--> 




<script type="text/javascript">
    //提交表单
    $(function() {
    	//默认高亮
		$(window.parent.document).find(".z_side").removeClass("hover");
		$(window.parent.document).find(".n11").addClass("hover");
        var demo = $(".addform").Validform({
            btnSubmit: "#btn_sub",
            btnReset: ".btn_reset",
            // tiptype: function(){},
              tiptype:function(msg,o,cssctl){
            // console.log(o);
            // console.log(msg);
            },
            label: ".label",
            showAllError: false,
            ajaxPost: true,
            callback: function(data) {
                $("#Validform_msg").hide();
                if (data.status == "0") {
                    art.dialog({width: 320, time: 5, title: '温馨提示(5秒后关闭)', content: data.info, ok: true});
                }
                if (data.status == "1") {
                    layer.msg(data.info);
                    setTimeout(function(){
        					// location.href = "/index.php?m=user&c=home&a=sure_info&username="+username;
                  window.location.href = data.url;
    					    },1000);
                    // window.location.href = data.url;
                }
            }
        });
    });
</script>